package org.example.Service.impl;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.example.Service.UserService;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.sql.SQLOutput;

@Service//业务层的注解 用来创建bean对象
public class UserServiceimpl implements UserService {


    @Override  //实现接口的注解
    public void add() {
        System.out.println("执行操作");
    }

    @Override
    public void addplus(String s) {
        System.out.println(
               "执行addplus"
        );
    }

    @Override
    public String addpluss2() {
        System.out.println("执行addplus2");
        return "aaa";  //增强后应取得“aaa”
    }

    @Override
    public void getid() {
        try {
            Thread.sleep(3);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }

    @Override
    public void getall() {

        for (int i = 0; i < 100; i++) {
            System.out.println(i);

        }
    }
}
